﻿namespace DeHeng_Mes.Constant
{

    /// <summary>
    /// 系统常量
    /// </summary>
    class SystemConstant
    {

        #region 类名匹配常量

        public const string Code = "Code";
        public const string DeviceErrorMessage = "DeviceErrorMessage";
        public const string StationStatus = "StationStatus";
        public const string Power = "Power";
        public const string ProduceOperation = "ProduceOperation";
        public const string ProduceOrder = "ProduceOrder";
        public const string StationError = "StationError";
        public const string Beat = "Beat";
        public const string DeviceErrorStatus = "DeviceErrorStatus";
        public const string Collection = "Collection";
        public const string ProduceStatus = "ProduceStatus";
        public const string CodeHelper = "CodeHelper";
        public const string IssuedCode = "IssuedCode";

        #endregion

        #region 线体名称匹配常量

        public const string LineCode = "61879";

        #endregion

        #region 订单状态常量
        public const string Ok = "1";
        public const string nOk = "2";
        public const string nCreate = "0";
        public const string illegal = "-1";
        #endregion

        #region 数据采集状态常量
        public const string InsertTableIllegal = "2";
        public const string dataNotCreate = "0";
        public const string InsertDataIllegal = "1";
        #endregion

        #region 订单状态常量
        public const string DeviceOk = "2";
        public const string DeviceNOk = "1";
        #endregion

        #region db块
        public const int Write = 6005;
        public const int Hart = 6011;
        public const int Order = 6008;
        public const int GetCode = 6014;
        #endregion

        #region 线程阻塞常量
        public const int Polling = 10000;
        #endregion

        #region 数采文件路径常量
        public const string RightGlueRemovalPath = @"D:\chujiao\右侧围R73视觉检测\AirRobots\VisionXData\Images\";
        public const string LeftGlueRemovalPath = @"D:\chujiao\左侧围R73视觉检测\AirRobots\VisionXData\Images\";

        public const string fdsCopyPath = @"D:\chujiao\SeqFds2";
        public const string fdsLoadPath = @"D:\chujiao\SeqFds\";

        public const string swOriginPath = @"C:\IVOSTUD\IVOSTUD Data Files\";
        public const string swSavePath = @"D:\chujiao\sw\";
        public const string swSuffix = "Prozessdaten";

        public const string leftGluesharedFoldUsername = "m2iftp";
        public const string leftGluesharedFoldPassword = "yq123456";
        public const string leftGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\leftglueblead\F3\";
        public const string leftGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string leftGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";
        public const string leftGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";

        public const string rightGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";
        public const string rightGluesharedFoldUsername = "m2iftp";
        public const string rightGluesharedFoldPassword = "yq123456";
        public const string rightGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\SeqFds\";
        public const string rightGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string rightGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";

        public const string smallGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";
        public const string smallGluesharedFoldUsername = "m2iftp";
        public const string smallGluesharedFoldPassword = "yq123456";
        public const string smallGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\SeqFds\";
        public const string smallGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string smallGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";

        public const string leftGlueCopyPath = @"D:\chujiao\Left65Glue\";
        public const string leftGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";
        public const string rightGlueCopyPath = @"D:\chujiao\RightR65Glue\";
        public const string rightGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";
        public const string smallGlueCopyPath = @"D:\chujiao\smallGlue\";
        public const string smallGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";

        public const string SpotWeldingPath = @"\\192.168.6.244\DATAcsv2\";
        #endregion

        #region 数采读取天数限制
        public const int day = 8;
        #endregion

        #region 数采错误数据保存天数限制
        public const int errorDay = 1;
        #endregion

        #region 数据库用户信息
        public const string MySqlName = "sa";
        public const string MySqlPassWord = "GUANHAOmenchuang_0506";
        #endregion

        #region 调用接口Url
        public const string ProduceHourUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/processTask/yieldAnalysis";
        public const string ProduceOperationUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/processTask/processReport";
        public const string AndonUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/andon/andonCall/autoCall";
        public const string StartTimeUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/orderInfo/chime";
        public const string BossProducePutUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/orderInfo/report";
        #endregion

        #region DB块常量
        public const int DB6000 = 6000;
        public const int DB6001 = 6001;
        public const int DB6002 = 6002;
        public const int DB6003 = 6003;
        public const int DB6004 = 6004;
        public const int DB6005 = 6005;
        public const int DB6006 = 6006;
        public const int DB6007 = 6007;
        public const int DB6008 = 6008;
        public const int DB6009 = 6009;
        public const int DB6010 = 6010;
        public const int DB6011 = 6011;
        public const int DB6012 = 6012;
        public const int DB6013 = 6013;
        public const int DB6014 = 6014;
        public const int DB6015 = 6015;
        #endregion

        #region 调用工厂Mes接口常量
        public const string FACTORY_MES_IP = "192.168.20.2";
        public const string FACTORY_MES_PORT = "8081";
        public const string FACTORY_MES_USERNAME = "dh-f3-line";
        public const string FACTORY_MES_PASSWORD = "MvqlVf13Wd9qDInTlMgEdO7L2so4S4AutU6eyoN90fMS5fltFRHcqhBEE+1z6frGed+22XcMy//cYm6jjRWtrw==";
        public const string FACTORY_MES_TOKEN_CACHE_KEY = "token";
        public const double FACTORY_MES_TOKEN_CACHE_EXPIRY = 20;
        #endregion

        #region
        public const string LINENAME = "W03-左右门槛线";
        #endregion

        #region 类名调用字符串常量
        public const string W03_PLC_01_STATUS = "W03_PLC_01_STATUS";
        public const string W03_PLC_02_STATUS = "W03_PLC_02_STATUS";
        public const string W03_PLC_03_STATUS = "W03_PLC_03_STATUS";
        public const string W03_PLC_04_STATUS = "W03_PLC_04_STATUS";
        #endregion

        #region 字段名调用字符串常量
        public const string OP10L = "Op10L";
        public const string OP15L = "Op15L";
        public const string OP20L = "Op20L";
        public const string OP30L = "Op30L";
        public const string OP40L = "Op40L";
        public const string OP50L = "Op50L";
        public const string OP60L = "Op60L";
        public const string OP70L = "Op70L";
        public const string OP80L = "Op80L";
        public const string OP90L = "Op90L";
        public const string OP100L = "Op100L";
        public const string OP110L = "Op110L";
        public const string OP120L_A = "Op120L_A";
        public const string OP120L_B = "Op120L_B";
        public const string OP125L = "Op125L";
        public const string OP130L = "Op130L";
        public const string OP140L = "Op140L";
        public const string OP150L = "Op150L";
        public const string OP160L_1 = "Op160L_1";
        public const string OP160L_2 = "Op160L_2";
        public const string OP170L = "Op170L";
        public const string OP180L = "Op180L";

        public const string OP10R = "Op10R";
        public const string OP15R = "Op15R";
        public const string OP20R = "Op20R";
        public const string OP30R = "Op30R";
        public const string OP40R = "Op40R";
        public const string OP50R = "Op50R";
        public const string OP60R = "Op60R";
        public const string OP70R = "Op70R";
        public const string OP80R = "Op80R";
        public const string OP90R = "Op90R";
        public const string OP100R = "Op100R";
        public const string OP110R = "Op110R";
        public const string OP120R_A = "Op120R_A";
        public const string OP120R_B = "Op120R_B";
        public const string OP125R = "Op125R";
        public const string OP130R = "Op130R";
        public const string OP140R = "Op140R";
        public const string OP150R = "Op150R";
        public const string OP160R_1 = "Op160R_1";
        public const string OP160R_2 = "Op160R_2";
        public const string OP170R = "Op170R";
        public const string OP180R = "Op180R";

        public const string STATION = "Station";
        public const string BATCH = "Batch";
        public const string TYPE = "Type";
        public const string WORKER = "Worker";
        public const string RBNO = "RBNo";
        public const string CODE = "Code";
        public const string STARTTIME = "StartTime";
        public const string ENDTIME = "EndTime";
        public const string BEAT = "Beat";
        public const string RESULT = "Result";
        #endregion

        #region 数组数据读取常量
        public const int ALL_STARTOFF = 0;

        public const int PLC01_STATUS_DB = 5000;
        public const int PLC01_STATUS_STARTOFF = 0;
        public const int PLC01_STATUS_ENDOFF = 87;

        public const int PLC02_STATUS_DB = 5000;
        public const int PLC02_STATUS_STARTOFF = 0;
        public const int PLC02_STATUS_ENDOFF = 87;

        public const int PLC03_STATUS_DB = 5000;
        public const int PLC03_STATUS_STARTOFF = 0;
        public const int PLC03_STATUS_ENDOFF = 87;

        public const int PLC04_STATUS_DB = 5000;
        public const int PLC04_STATUS_STARTOFF = 0;
        public const int PLC04_STATUS_ENDOFF = 87;




        public const int PLC01_TIGHTEN_DB = 5030;
        public const int PLC01_TIGHTEN_STARTOFF = 0;
        public const int PLC01_TIGHTEN_ENDOFF = 520;

        public const int PLC01_RIVETE_DB = 5050;
        public const int PLC01_RIVETE_STARTOFF = 0;
        public const int PLC01_RIVETE_ENDOFF = 1560;

        public const int PLC01_FDS_DB = 5020;
        public const int PLC01_FDS_STARTOFF = 0;
        public const int PLC01_FDS_ENDOFF = 260;

        public const int PLC01_GLUE_DB = 5010;
        public const int PLC01_GLUE_STARTOFF = 0;
        public const int PLC01_GLUE_ENDOFF = 2492;



        public const int PLC02_FDS_DB = 5020;
        public const int PLC02_FDS_STARTOFF = 0;
        public const int PLC02_FDS_ENDOFF = 1300;

        public const int PLC02_TIGHTEN_DB = 5040;
        public const int PLC02_TIGHTEN_STARTOFF = 0;
        public const int PLC02_TIGHTEN_ENDOFF = 520;

        public const int PLC02_RIVETE_DB = 5050;
        public const int PLC02_RIVETE_STARTOFF = 0;
        public const int PLC02_RIVETE_ENDOFF = 780;

        public const int PLC02_GLUE_DB = 5010;
        public const int PLC02_GLUE_STARTOFF = 0;
        public const int PLC02_GLUE_ENDOFF = 1608;

        public const int PLC02_WELD_DB = 5030;
        public const int PLC02_WELD_STARTOFF = 0;
        public const int PLC02_WELD_ENDOFF = 404;

        public const int PLC02_POINT_DB = 5090;
        public const int PLC02_POINT_STARTOFF = 0;
        public const int PLC02_POINT_ENDOFF = 504;

        public const int PLC02_CCD1_DB = 5022;
        public const int PLC02_CCD1_STARTOFF = 0;
        public const int PLC02_CCD1_ENDOFF = 667;

        public const int PLC02_CCD2_DB = 5080;
        public const int PLC02_CCD2_STARTOFF = 0;
        public const int PLC02_CCD2_ENDOFF = 260;
        #endregion

        #region 工单相关偏移量与DB
        public const int ORDER_DB = 6000;
        public const int ORDER_ID_OFF = 0;
        public const int ORDER_PRODUCENUM_OFF = 256;
        public const int ORDER_MATERIALCODE_OFF = 258;
        public const int ORDER_STATUS_OFF = 514;


        public const int ORDER_CARTEPY_OFF = 256;
        public const int ORDER_PLCSTARTWORK_OFF = 512;
        public const int ORDER_ORDEREND_OFF = 512;
        public const int ORDER_PLCENDWORK_OFF = 512;
        public const int ORDER_ORDERSAVE_OFF = 512;
        public const int ORDER_PLCSTARTWORK_BIT = 512;
        public const int ORDER_ORDEREND_BIT = 512;
        public const int ORDER_PLCENDWORK_BIT = 512;
        public const int ORDER_ORDERSAVE_BIT = 512;
        #endregion

        #region 数据文件路径
        #endregion
    }
}
